# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-backgrounds
pkgver=3.24.0+2+g755b6f9
pkgrel=1
pkgdesc="Background images and data for GNOME"
arch=(any)
makedepends=('intltool' 'git' 'glib2' 'gnome-common')
url="https://git.gnome.org/browse/gnome-backgrounds"
license=('GPL')
groups=('gnome')
_commit=755b6f9ec3e873a11b967b6d5220124d94a5a053  # master
source=("git+https://git.gnome.org/browse/gnome-backgrounds#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  # Fix version
  sed -i -e 's/3.22.1/3.24.0/' configure.ac
  git tag -f 3.24.0 78d2661d44027f4358f021baf510e51b64b465ed 

  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
